#ifndef								__PROCESSOR_H__
#	define							__PROCESSOR_H__

#	include							<boost/thread/mutex.hpp>
#	include							<queue>
#	include							<map>
#	include							"Order.h"
#	include							"byte.h"
#	include							<boost/timer/timer.hpp>

class								IServerModule;
class								ConnectionManager;

class								Processor
{
public:
	Processor();
	~Processor();

private:
	boost::mutex						_mutex;
	std::map<Protocol, class IServerModule *>	_protocol;
	ConnectionManager					*_conn;

public:
	boost::timer::cpu_timer				time;
	void								update();
	void								operator()(std::vector<byte> *, unsigned short);
	void								sendOrder(IOrder*, unsigned int);
	void								setConn(ConnectionManager*);
	std::string							getIp(unsigned int) const;

private:
	void								processOrder(IOrder *);

};

#endif								// ! __PROCESSOR_H__
